#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

#include"priority_queue.h"
#include"list.h"


template<class T>
class Less
{
public:
	bool operator()(const T& a,const T& b)
	{
		return a < b;
	}
};

void test_1()
{
	yj::priority_queue<int> pq;
	pq.push(2);
	pq.push(1);
	pq.push(6);
	pq.push(3);

	while (!pq.empty())
	{
		cout << pq.top() << endl;
		pq.pop();
	}
	cout << endl;
}

void test_2()
{
	Less<int> less;
	cout << less(1, 2) << endl;
}

void test_3(const yj::list<int>& lt)
{
	yj::list<int>::const_revers_iterator it = lt.rbegin();
	while (it != lt.rend())
	{
		cout << *it << ' ';
		++it;
	}
	cout << endl;
}
int main()
{	
	yj::list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);
	lt.push_back(5);
	test_3(lt);

	return 0;
}